# -*- codeing = UTF-8 -*-
# @Time : 2022/12/16 14:07
# @Author : 王一1122
# @File : 基础入门.py
# @Software : PyCharm

# int （整形）
print(19)
print(300 + 19)

# str （字符串）
# 单行文本
"毛谦"
'李国良'

# 多行文本
"""陈丽萍"""
'''梁吉宁'''
print(12 + 12)           # 24，整型
print("12" + "12")         # "1212"，字符串（文本）
print("毛谦" * 3)           # 毛谦毛谦毛谦


# 整形字符串互相转换
str(19)                     # 19    ->     "19"
int("88")                   # "88"  ->     88

# int("广西联通")  # 无法转换，报错

# 练习题
print(50 * 10/5)         #100
print(30 % 2)            #0
print(3 * "我爱我的祖国")
print(int("100")*3)
print(int("123") + int("88"))
print(str(111) + str(222))
print(str(111)*3)


# bool （布尔类型） 真 假
# 1  >  2     			-> False
# 1  ==  2				-> False
# "梁吉宁" == "陈青"	    -> False
# 22 == 22 				-> True

# 整型、字符串类型 -> 布尔值。
# 1.整型， 0转换为布尔值为False，其他均为True
print(bool(0))   # F
print(bool(-1))  # T
print(bool(100)) # T
# 2.字符串，空字符串转换为布尔值为False，其他均为True
print(bool(""))  # F
print(bool("s"))  # T
print(bool(" "))  # T

# 练习题
print(int("8")>7)           # T
print(str(111)==111)        # F
print(bool(-1))             # T
print(bool(0))              # F
print(bool(""))             # F
print(bool("你好"))          # T
print(True==True)            # T
print(True==False)           # F
print(bool("")==bool(0))     # T




# addr （变量）             变量，就是我们给某个值取名称/外号
addr = "中国北京市昌平区沙河镇xxx校区1号楼3单元909"
print(addr)
print(addr)
print(addr)
print(addr)

age = 18
name = "邓新成"
is_success = 1 > 19  # False

addr = "中国北京" + "沙河"

address = "中国北京" + "海淀区" + name   # "中国北京海淀区邓新成"


result = 1 == 2  # False

print(result)

# 练习
# 1  name = "吉诺比利"
# 2  name0 = "帕克"
# 3  name_1 = "邓肯"
# 4  _coach = "波波维奇"
# 5  _ = "卡哇伊"
# 6  1_year = "1990"             F
# 7  year_1_ = "1990"
# 8  _1_year = "1990"
# 9  nba-team = "马刺"            F
# 10 new*name = "伦纳德"          F

# 看代码写结果
# 1
alex_length = 3
wupeiqi_length = 18
total = alex_length + wupeiqi_length
print(total)                  #21

# 2
nickname = "一米八大高个"
username = nickname
username = "弟弟"
print(nickname) #  "一米八大高个"
print(username) # "弟弟"

# 3
nickname = "一米八大高个"
username = nickname
nickname = "弟弟"
print(nickname) # "弟弟"
print(username) # "一米八大高个"

# 4
nickname = "一米八大高个"
username = nickname
nickname = "弟弟"
text = username + nickname
print(text) # "一米八大高个弟弟"

# 5
string_number = "20"
num = int(string_number)
data = string_number * 3
print(data) # "202020"
value = num * 3
print(value) # 60


# 注释 快捷键 control + ?

# input()  输入
text = input("提示信息")
print(text)

name = input("请输入姓名:")
age = input("请输入年龄:")
email = input("请输入邮箱:")
text = name + age + email
print(text)

name = input("请输入姓名:")
age = input("请输入年龄:")
email = input("请输入邮箱:")
text = "我叫" + name + "，今年" + age + "岁，我的邮箱是" + email + "。"
print(text)

v1 = input("请输入数字:")  # "100"
v2 = input("请输入数字:")  # "200"
result = v1 + v2
print(result)  # "100200"

v1 = input("请输入数字:")  # "100"
v2 = input("请输入数字:")  # "200"
result = int(v1) + int(v2)
print(result)  # 300



# 条件语句

# if 条件{
#     ...
# }else{
#     ...
# }

# 1
print("开始")
if True:
    print("111")
    print("222")
else:
    print("666")
    print("999")
print("结束")

# 2
print("开始")
if 1 > 2:
    print("111")
    print("222")
else:
    print("666")
    print("999")
print("结束")

# 3
print("开始")
num = 9
if num > 10:
    print("111")
    print("222")
else:
    print("666")
    print("999")
print("结束")

# 4
print("欢迎使用联通系统")
user = input("请输入用户名：")
pwd = input("请输入密码：")
if user == "wupeiqi" and pwd == "123":
    print("恭喜你")
    print("登录成功，获得奖励100w。")
else:
    print("登录失败")
    print("你错误的是一个成为百万年薪的人")
print("程序结束")





























